package com.zzy.common.entity.db;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import static com.zzy.common.entity.db.AdminDaoEntity.TableFiledConst.*;

/**
 * @author zhuZhaoYang
 * @date 2021/7/11 22:00
 */
@TableName(TABLE_NAME)
@Data
public class AdminDaoEntity {

    @TableId(type = IdType.AUTO)
    private Integer id;
    @TableField(USERNAME)
    private String username;
    @TableField(PASSWORD)
    private String password;
    @TableField(ACTOR_TYPE)
    private Integer actorType;



    public String getSalt() {
        return username;
    }


    public static class TableFiledConst {
        public static final String TABLE_NAME = "admin";
        public static final String ID = "id";
        public static final String USERNAME = "username";
        public static final String PASSWORD = "password";
        public static final String ACTOR_TYPE = "actorType";
    }
}
